//
//  HMSportTracking.h
//  HMBest22
//
//  Created by Apple on 17/1/9.
//  Copyright © 2017年 Apple. All rights reserved.
//  运动的模型

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <MAMapKit/MAMapKit.h>
#import "HMSportTrackingLine.h"

extern NSString *const HMSportTrackingNotification;

/// 运动类型枚举
typedef enum : NSUInteger {
    HMSportTypeWalk, // 走路
    HMSportTypeRun,  // 跑步
    HMSportTypeBike, // 骑行
} HMSportType;

/// 运动状态枚举
typedef enum : NSUInteger {
    HMSportStatePause,
    HMSportStateContinue,
    HMSportStateFinish,
} HMSportState;

/// GPS信号强度枚举
typedef enum : NSUInteger {
    HMSportGPSSingalStateDisconnect, // 断开连接
    HMSportGPSSingalStateBad,    // 差
    HMSportGPSSingalStateNormal, // 一般
    HMSportGPSSingalStateGood,   // 好
} HMSportGPSSingalState;

@interface HMSportTracking : NSObject
/// 根据运动类型构造
- (instancetype)initWithSportType:(HMSportType)sportType andSportState:(HMSportState)sportState;
/// 运动类型
@property (nonatomic,readonly) HMSportType sportType;

/// 运动状态
@property (nonatomic,assign) HMSportState sportState;

/// 用户真正画运动轨迹的位置
@property (nonatomic, strong) CLLocation *userLocation;

/// 图片
@property(nonatomic,strong,readonly)UIImage * image;

// 拼接不同的定位  获取之间的折线
- (HMSportPolyline *)appendLocation:(CLLocation *)location;


/// 最大速度
@property (nonatomic) double maxSpeed;
/// 平均速度
@property (nonatomic) double avgSpeed;
/// 运动的总距离
@property (nonatomic) double totalDistance;
/// 运动的总时间
@property (nonatomic) double totalTime;
/// 运动总时间的字符串形式
@property (nonatomic, copy) NSString *totalTimeStr;
@end
